<?php
declare(strict_types=1);

namespace App\Resource\LotteryCrystal\Leaderboard;


use Illuminate\Http\Resources\Json\JsonResource;

class Resource extends JsonResource
{
    public function toArray($request)
    {
        return [
            "id" => $this->user_id,
            "nickname" => $this->user->nickname ?? "",
            "avatar" => $this->user->head_picture ?? "",
            "index" => $this->index,
            "score" => $this->score,
            "diff" => $this->diff,
        ];
    }
}